home *** CD-ROM | disk | FTP | other *** search
- #ifndef IDLER_H
- #define IDLER_H
-
- /**********************************************************************************
- FILE: Idler.h
- Description: A class whose derivative can do things like check for command
- period, spin a beach ball, etc.
-
- 1996, CE Software, Inc. All rights reserved.
- P.O. Box 65580
- West Des Moines, Iowa 50265 U.S.A.
-
- ***********************************************************************************/
-
- class Idler
- {
- private:
- long mlPeriod;
- unsigned long mulNextPeriod;
-
- protected:
- Idler (void);
- Idler (const Idler& oRHS);
- Idler& operator= (const Idler& oRHS);
-
- Boolean PeriodHasExpired (void);
-
- // Classes derived from this must override this to provide their own special
- // callback processing
- virtual void YieldAction (void) = 0;
-
- public:
- virtual ~Idler (void) { }
-
- void YieldTime (void);
-
- long GetPeriod (void) { return mlPeriod; }
- void SetPeriod (long lPeriod);
- };
-
- #endif //IDLER_H
-